package cn.csg.iotplatform.module.system.api.file;

import cn.csg.iotplatform.module.system.api.file.dto.EqtFileDeleteVO;
import cn.csg.iotplatform.module.system.api.file.dto.EqtFileDto;
import cn.csg.iotplatform.module.system.api.file.dto.ModelAttachmentVO;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.dtflys.forest.annotation.*;
import com.dtflys.forest.http.ForestResponse;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * @author Clqv
 * @create 2024--11--11 10:52
 *
 * 设备共库附件相关api
 */
public interface EqtFileClient {

    @Post(value = "#{iot.eqt-center.address}/gmp/eqt/iotmanage/modelAttachment/saveAttachmentFile", contentType = "multipart/form-data")
    public ForestResponse<JSONObject> saveAttachmentFile(@Header Map<String, Object> headerMap, EqtFileDto eqtFileDto, @RequestBody MultipartFile file);

    @Post("#{iot.eqt-center.address}/gmp/eqt/iotmanage/modelAttachment/deleteAttachmentFile")
    ForestResponse<JSONObject> deleteAttachmentFile(@Header Map<String, Object> headerMap, @JSONBody EqtFileDeleteVO eqtFileDeleteVO);
}
